<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php JHTML::_('behavior.tooltip'); ?>
<?php
	// Set toolbar items for the page
	$edit		= JRequest::getVar('edit',true);
	$text = !$edit ? JText::_( 'New' ) : JText::_( 'Edit' );
	JToolBarHelper::title(   JText::_( strtoupper('Component') ).': <small><small>[ ' . $text.' ]</small></small>' );
	JToolBarHelper::save();
	if (!$edit)  {
		JToolBarHelper::cancel();
	} else {
		// for existing items the button is renamed `close`
		JToolBarHelper::cancel( 'cancel', 'Close' );
	}
?>
<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) {
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}

		// do field validation
		submitform( pressbutton );
	}
</script>
<form action="<?php echo $this->action; ?>" method="post" name="adminForm" id="adminForm">
<div class="col width-70">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Details' ); ?></legend>
  <table class="admintable">
    <tr>
      <td width="100" align="right" class="key"><label for="name"> <?php echo JText::_( 'FIELD_NAME' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="name" id="name" size="72" maxlength="250" value="<?php echo $this->component->name;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="link"> <?php echo JText::_( 'FIELD_LINK' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="link" id="link" size="72" maxlength="250" value="<?php echo $this->component->link;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="menuid"> <?php echo JText::_( 'FIELD_MENUID' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="menuid" id="menuid" size="72" maxlength="250" value="<?php echo $this->component->menuid;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="parent"> <?php echo JText::_( 'FIELD_PARENT' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="parent" id="parent" size="72" maxlength="250" value="<?php echo $this->component->parent;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="admin_menu_link"> <?php echo JText::_( 'FIELD_ADMIN_MENU_LINK' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="admin_menu_link" id="admin_menu_link" size="72" maxlength="250" value="<?php echo $this->component->admin_menu_link;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="admin_menu_alt"> <?php echo JText::_( 'FIELD_ADMIN_MENU_ALT' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="admin_menu_alt" id="admin_menu_alt" size="72" maxlength="250" value="<?php echo $this->component->admin_menu_alt;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="option"> <?php echo JText::_( 'FIELD_OPTION' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="j_option" id="j_option" size="72" maxlength="250" value="<?php echo $this->component->option;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="admin_menu_img"> <?php echo JText::_( 'FIELD_ADMIN_MENU_IMG' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="admin_menu_img" id="admin_menu_img" size="72" maxlength="250" value="<?php echo $this->component->admin_menu_img;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="iscore"> <?php echo JText::_( 'FIELD_ISCORE' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="iscore" id="iscore" size="72" maxlength="250" value="<?php echo $this->component->iscore;?>" />
      </td>
    </tr>

	<tr>
      <td width="100" align="right" class="key"><label for="enabled"> <?php echo JText::_( 'FIELD_ENABLED' ); ?>: </label>
      </td>
      <td><input class="text_area" type="text" name="enabled" id="enabled" size="72" maxlength="250" value="<?php echo $this->component->enabled;?>" />
      </td>
    </tr>

	<tr>
      <td valign="top" align="right" class="key"><label for="ordering"> <?php echo JText::_( 'FIELD_ORDERING' ); ?>: </label>
      </td>
      <td><?php echo $this->lists['ordering']; ?> </td>
    </tr> 
  </table>
</fieldset>
</div>
<div class="col width-30">
	<?php
			echo $this->pane->startPane("params-pane");
			$title = JText::_( strtoupper('Parameters') );			
			echo $this->pane->startPanel( $title, "detail-page" );
			echo $this->params->render('params');
			echo $this->pane->endPanel();
			echo $this->pane->endPane();
		?>	
</div>   
  <div class="clr"></div>
  <input type="hidden" name="option" value="com_component" />
  <input type="hidden" name="cid[]" value="<?php echo $this->component->id; ?>" />
  <input type="hidden" name="task" value="" />
  <?php echo JHTML::_( 'form.token' ); ?>
</form>
